<!DOCTYPE html>



  


<html class="theme-next muse use-motion" lang="">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta name="description" content="1.输入地址：这个不用多说了，就是输入网址 2.浏览器查找域名的 IP 地址，这一步包括 DNS 具体的查找过程简单地说就是把用户输入的网址转换成ip，访问到服务器 3.浏览器向 web 服务器发送一个 HTTP 请求通过浏览器向服务器发送一个POST请求，浏览器标识自己（User-Agent头），并指出它将接受哪种类型的响应（Accept和Accept-Encoding标头）。连接标题要求服务">
<meta property="og:type" content="article">
<meta property="og:title" content="到页面加载显示完成，这个过程中都发生了什么">
<meta property="og:url" content="http://yoursite.com/2018/05/09/到页面加载显示完成，这个过程中都发生了什么/index.html">
<meta property="og:site_name" content="From&#39;s blog">
<meta property="og:description" content="1.输入地址：这个不用多说了，就是输入网址 2.浏览器查找域名的 IP 地址，这一步包括 DNS 具体的查找过程简单地说就是把用户输入的网址转换成ip，访问到服务器 3.浏览器向 web 服务器发送一个 HTTP 请求通过浏览器向服务器发送一个POST请求，浏览器标识自己（User-Agent头），并指出它将接受哪种类型的响应（Accept和Accept-Encoding标头）。连接标题要求服务">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2018-05-09T15:40:53.562Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="到页面加载显示完成，这个过程中都发生了什么">
<meta name="twitter:description" content="1.输入地址：这个不用多说了，就是输入网址 2.浏览器查找域名的 IP 地址，这一步包括 DNS 具体的查找过程简单地说就是把用户输入的网址转换成ip，访问到服务器 3.浏览器向 web 服务器发送一个 HTTP 请求通过浏览器向服务器发送一个POST请求，浏览器标识自己（User-Agent头），并指出它将接受哪种类型的响应（Accept和Accept-Encoding标头）。连接标题要求服务">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2018/05/09/到页面加载显示完成，这个过程中都发生了什么/"/>





  <title>到页面加载显示完成，这个过程中都发生了什么 | From's blog</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="default">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">From's blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2018/05/09/到页面加载显示完成，这个过程中都发生了什么/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wang hang">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="From's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">到页面加载显示完成，这个过程中都发生了什么</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2018-05-09T23:40:41+08:00">
                2018-05-09
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <hr>
<p><strong>1.输入地址：</strong><br>这个不用多说了，就是输入网址</p>
<p><strong>2.浏览器查找域名的 IP 地址，这一步包括 DNS 具体的查找过程</strong><br>简单地说就是把用户输入的网址转换成ip，访问到服务器</p>
<p><strong>3.浏览器向 web 服务器发送一个 HTTP 请求</strong><br>通过浏览器向服务器发送一个POST请求，浏览器标识自己（User-Agent头），并指出它将接受哪种类型的响应（Accept和Accept-Encoding标头）。连接标题要求服务器保持打开TCP连接以进一步请求。<br>其他的cookie目前还没学不懂，就不做表述了</p>
<p><strong>4.服务器的永久重定向响应（从 <a href="http://qq.com" target="_blank" rel="noopener">http://qq.com</a> 到 <a href="http://www.qq.com）" target="_blank" rel="noopener">http://www.qq.com）</a></strong><br>这个不太懂，网上</p>
<p><strong>5.浏览器跟踪重定向地址</strong><br>同上</p>
<p><strong>6.服务器处理请求</strong><br>服务器将收到GET请求，处理它并发送回应。</p>
<p><strong>7.服务器返回一个 HTTP 响应</strong><br>Content-Encoding标头告诉浏览器使用gzip算法压缩响应主体。解压blob后，你会看到你期望的HTML<br>blob是什么：BLOB (binary large object)，二进制大对象，是一个可以存储二进制文件的容器，典型的BLOB是一张图片或一个声音文件，由于它们的尺寸，必须使用特殊的方式来处理（例如：上传、下载或者存放到一个数据库）</p>
<p><strong>8.浏览器显示 HTML</strong><br>开始渲染页面</p>
<p><strong>9.浏览器发送请求获取嵌入在 HTML 中的资源（如图片、音频、视频、CSS、JS等等）</strong><br>当浏览器呈现HTML时，它会注意到需要获取其他URL的标签。浏览器将发送一个GET请求来检索每个文件。</p>
<p><strong>10.浏览器发送异步请求</strong><br>异步还没有学，下面是我查的一些<br>浏览器中执行的JavaScript必须向服务器发送异步请求。异步请求是通过编程构造的GET或POST请求，转到特殊的URL。<br>“AJAX”，即“异步JavaScript和XML”，即使没有特别的理由，服务器必须将响应格式化为XML格式。</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/05/09/如何实现数组去重？/" rel="next" title="如何实现数组去重？">
                <i class="fa fa-chevron-left"></i> 如何实现数组去重？
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/05/09/时间复杂度的排序分析/" rel="prev" title="时间复杂度的排序分析">
                时间复杂度的排序分析 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">Wang hang</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">52</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            

            
              
              
              <div class="site-state-item site-state-tags">
                
                  <span class="site-state-item-count">2</span>
                  <span class="site-state-item-name">tags</span>
                
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Wang hang</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Muse</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
